test: stabilize flaky TestInstancePlanCacheConcurrencySysbench#69639
test: stabilize flaky TestInstancePlanCacheConcurrencySysbench#69639flaky-claw wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe concurrency test worker no longer tolerates deadlock errors during DML execution, and DML statements are now routed to a single randomly chosen worker session instead of being distributed randomly across sessions, to reduce deadlock occurrences and preserve session ordering. ChangesConcurrency test deadlock fix
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)level=error msg="Running error: context loading failed: failed to load packages: failed to load packages: failed to load with go/packages: context deadline exceeded" Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #69639 +/- ##
================================================
- Coverage 76.3268% 74.1115% -2.2153%
================================================
Files 2041 2050 +9
Lines 560589 576524 +15935
================================================
- Hits 427880 427271 -609
- Misses 131808 149047 +17239
+ Partials 901 206 -695
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
What problem does this PR solve?
Issue Number: close #57514
Problem Summary:
Flaky test
TestInstancePlanCacheConcurrencySysbenchinpkg/planner/core/casetest/instanceplancacheintermittently fails, so this PR stabilizes that path.What changed and how does it work?
Root Cause
Unsynchronized multi-worker DML routing made lock deadlocks part of a plan-cache equivalence test.
Fix
Single-writer DML removes unrelated lock scheduling while preserving normal-vs-prepared SQL comparison under concurrent sessions.
Verification
Spec:
pkg/planner/core/casetest/instanceplancache :: TestInstancePlanCacheConcurrencySysbenchtidb.issue_scoped.v2BASELINE_ONLYGO_TEST_WITH_TAGSintest, deadlockbaseline_onlyObserved result:
Required flaky case was not skipped.
target-flaky passed.
package passed.
build passed.
lint passed.
Gate checklist:
Commands:
go test -json -tags=intest,deadlock ./pkg/planner/core/casetest/instanceplancache -run '^TestInstancePlanCacheConcurrencySysbench$' -count=1go test -json -tags=intest,deadlock ./pkg/planner/core/casetest/instanceplancache -count=1make buildmake lintCheck List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
Fixes #57514
Summary by CodeRabbit